From: Zhen Lei Date: Tue, 23 Aug 2022 14:30:38 +0000 (+0100) Subject: xen/arm: smmuv3: Remove unnecessary oom message X-Git-Tag: archive/raspbian/4.17.0-1+rpi1^2~33^2~236 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=96a0f2a264c6afb128cff4c6845225f8e3776ed7;p=xen.git xen/arm: smmuv3: Remove unnecessary oom message Backport Linux commit affa909571b0. This is the clean backport without any changes. Fixes scripts/checkpatch.pl warning: WARNING: Possible unnecessary 'out of memory' message Remove it can help us save a bit of memory. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210609125438.14369-1-thunder.leizhen@huawei.com Signed-off-by: Will Deacon Origin: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git affa909571b0 Signed-off-by: Rahul Singh Acked-by: Stefano Stabellini --- diff --git a/xen/drivers/passthrough/arm/smmu-v3.c b/xen/drivers/passthrough/arm/smmu-v3.c index c53d4c96a4..c47e7dea04 100644 --- a/xen/drivers/passthrough/arm/smmu-v3.c +++ b/xen/drivers/passthrough/arm/smmu-v3.c @@ -1647,10 +1647,8 @@ static int arm_smmu_init_l1_strtab(struct arm_smmu_device *smmu) void *strtab = smmu->strtab_cfg.strtab; cfg->l1_desc = _xzalloc(size, sizeof(void *)); - if (!cfg->l1_desc) { - dev_err(smmu->dev, "failed to allocate l1 stream table desc\n"); + if (!cfg->l1_desc) return -ENOMEM; - } for (i = 0; i < cfg->num_l1_ents; ++i) { arm_smmu_write_strtab_l1_desc(strtab, &cfg->l1_desc[i]); @@ -2435,10 +2433,8 @@ static int arm_smmu_device_probe(struct platform_device *pdev) struct arm_smmu_device *smmu; smmu = xzalloc(struct arm_smmu_device); - if (!smmu) { - dev_err(pdev, "failed to allocate arm_smmu_device\n"); + if (!smmu) return -ENOMEM; - } smmu->dev = pdev; if (pdev->of_node) {